﻿<UserControl x:Class="ViCode_LeVi.Controls.VMTabBalanceAndOthers_Trade"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls">
    <ScrollViewer>
        <StackPanel>
            <DockPanel>
                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" >
                    <vmcontrol:VMTextBlockExt  Margin="2" TextPath="CurrencySymbol_UI" />
                    <vmcontrol:VMTextBox_Number  Margin="2" Text="{Binding CurrencySymbol}"/>
                    <Button Content="Print" Click="Button_Click"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <vmcontrol:VMTextBlock_Fincance_Title TextPath="Step_BalanceAndOthers_Trade_Header" Margin="2"/>
                </StackPanel>
            </DockPanel>

            <vmcontrol:VMTextBlock_Fincance_Space_Header/>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="6*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="0" Grid.Column="0" Text="=" Margin="2" Visibility="Hidden"/>
                <vmcontrol:VMTextBox Grid.Row="0" Grid.Column="0"  Grid.ColumnSpan="2" Margin="2" Text="{Binding ProductName}"/>
                <vmcontrol:VMTextBlock_Trade_1 Grid.Row="0" Grid.Column="2" Text="%" Margin="2" TextAlignment="Right"/>
                <DockPanel Grid.Row="0" Grid.Column="4">
                    <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="0" Grid.Column="2" TextPath="UI_Text_Currency" Margin="2"/>
                    <vmcontrol:VMTextBox Grid.Row="0" Grid.Column="1"  Grid.ColumnSpan="2" Margin="2" Text="{Binding CurrencyChar}"/>
                </DockPanel>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="0" Grid.Column="5" Text="-" Margin="2" Visibility="Hidden"/>
            </Grid>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="6*"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="0" Grid.Column="1" TextPath="UI_Text_ListPriceList" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="0" Grid.Column="4" Text="{Binding ListPriceSupplier, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="1" Grid.Column="0" Text="-" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="1" Grid.Column="1" TextPath="UI_Text_TradeDiscount" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="1" Grid.Column="2" Text="{Binding TradeDiscountPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="1" Grid.Column="4" Text="{Binding TradeDiscountMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="1" Grid.Column="5" Text="-" Margin="2"/>

                <Border Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="2" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <!--<vmcontrol:VMTextBlock_Trade_2 Grid.Row="3" Grid.Column="0" Text="=" Margin="2"/>-->
                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="3" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="3" Grid.Column="1" TextPath="UI_Text_InvoicePriceSupplier" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="3" Grid.Column="4" Text="{Binding InvoicePriceSupplier, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="4" Grid.Column="0" Text="-" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="4" Grid.Column="1" TextPath="UI_Text_OtherSupplierDiscounts" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="4" Grid.Column="2" Text="{Binding OtherSupplierDiscountsPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="4" Grid.Column="4" Text="{Binding OtherSupplierDiscountsMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="4" Grid.Column="5" Text="-" Margin="2"/>

                <Border Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="6" Grid.Column="0"/>
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="6" Grid.Column="1" TextPath="UI_Text_InvoicePriceSupplier2" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="6" Grid.Column="4" Text="{Binding InvoicePriceSupplier2, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="7" Grid.Column="0" Text="-" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="7" Grid.Column="1" TextPath="UI_Text_OtherCashDiscounts" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="7" Grid.Column="2" Text="{Binding OtherCashDiscountsPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="7" Grid.Column="4" Text="{Binding OtherCashDiscountsMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="7" Grid.Column="5" Text="-" Margin="2"/>

                <Border Grid.Row="8" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="8" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="8" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="9" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="9" Grid.Column="1" TextPath="UI_Text_PurchasePrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="9" Grid.Column="4" Text="{Binding PurchasePrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="10" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="10" Grid.Column="1" TextPath="UI_Text_PurchasingCosts" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="10" Grid.Column="2" Text="{Binding PurchasingCostsPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="10" Grid.Column="4" Text="{Binding PurchasingCostsMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="10" Grid.Column="5" Text="+" Margin="2"/>


                <Border Grid.Row="11" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="11" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="11" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="12" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="12" Grid.Column="1" TextPath="UI_Text_AcquistitionPrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="12" Grid.Column="4" Text="{Binding AcquistitionPrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="13" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="13" Grid.Column="1" TextPath="UI_Text_IndirectCosts" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="13" Grid.Column="2" Text="{Binding IndirectCostsPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="13" Grid.Column="4" Text="{Binding IndirectCostsMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="13" Grid.Column="5" Text="+" Margin="2"/>

                <Border Grid.Row="14" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="14" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="14" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="15" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="15" Grid.Column="1" TextPath="UI_Text_CostPrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="15" Grid.Column="4" Text="{Binding CostPrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="16" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="16" Grid.Column="1" TextPath="UI_Text_Profit" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="16" Grid.Column="2" Text="{Binding ProfitPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="16" Grid.Column="4" Text="{Binding ProfitMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="16" Grid.Column="5" Text="+" Margin="2"/>

                <Border Grid.Row="17" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="17" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="17" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="18" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="18" Grid.Column="1" TextPath="UI_Text_GrossSalesPrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="18" Grid.Column="4" Text="{Binding GrossSalesPrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="19" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="19" Grid.Column="1" TextPath="UI_Text_SalesCost" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="19" Grid.Column="2" Text="{Binding SalesCostPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="19" Grid.Column="4" Text="{Binding SalesCostMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="19" Grid.Column="5" Text="+" Margin="2"/>

                <Border Grid.Row="20" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="20" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="20" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="21" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="21" Grid.Column="1" TextPath="UI_Text_NetSalesPrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="21" Grid.Column="4" Text="{Binding NetSalesPrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="22" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="22" Grid.Column="1" TextPath="UI_Text_CustomerCashDiscount" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="22" Grid.Column="2" Text="{Binding CustomerCashDiscountPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="22" Grid.Column="4" Text="{Binding CustomerCashDiscountMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="22" Grid.Column="5" Text="+" Margin="2"/>

                <Border Grid.Row="23" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="23" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="23" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="24" Grid.Column="0"/>
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="24" Grid.Column="1" TextPath="UI_Text_InvoicePrice" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="24" Grid.Column="4" Text="{Binding InvoicePrice, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="25" Grid.Column="0" Text="+" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2_CanEdit Grid.Row="25" Grid.Column="1" TextPath="UI_Text_CustomerDiscount" Margin="2"/>
                <vmcontrol:VMTextBox_Number Grid.Row="25" Grid.Column="2" Text="{Binding CustomerDiscountPercent, UpdateSourceTrigger = PropertyChanged}" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="25" Grid.Column="4" Text="{Binding CustomerDiscountMoney, Mode = OneWay}" Margin="2"/>
                <vmcontrol:VMTextBlock_Trade_2 Grid.Row="25" Grid.Column="5" Text="+" Margin="2"/>

                <Border Grid.Row="26" Grid.Column="1" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,1,0,0"/>
                <Border Grid.Row="26" Grid.Column="2" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>
                <Border Grid.Row="26" Grid.Column="4" Grid.ColumnSpan="1" BorderBrush="Black" BorderThickness="0,2,0,0"/>

                <vmcontrol:VMTextBlock_Trade_SignEqual Grid.Row="27" Grid.Column="0" />
                <vmcontrol:VMTextBlock_Trade_1_CanEdit Grid.Row="27" Grid.Column="1" TextPath="UI_Text_ListPriceSales" Margin="2"/>
                <vmcontrol:VMTextBox_Number_ReadOnly Grid.Row="27" Grid.Column="4" Text="{Binding ListPriceSales, Mode = OneWay}" Margin="2"/>

            </Grid>

        </StackPanel>
    </ScrollViewer>
</UserControl>
